using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EZCRS.HCMS.DataAcl;
using EZCRS.HCMS.Bll.userinfo;

namespace EZCRS.HCMS.Web.manage.users
{
    public partial class admin_list : ManageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CheckModule(9);

                //ImgReturn.Attributes.Add("onclick", "history.back();return false;");
                Titlepage1.initlabnew = "<a href=\"admin_add.aspx\"><img src=\"../../image/new.gif\" border=0></a>";
                getdata();
                SetDataBind();
            }
        }

        private void getdata()
        {
            Blluser AdmU = new Blluser();
            if (BasGroupId != 0)
                tableList = AdmU.User_List(BasGroupId.ToString(), "0");
            else
                tableList = AdmU.User_List("0", "0");
        }

        protected override void DataBindTableList()
        {
            getdata();
            base.DataBindTableList();
        }

        public void gvList_DataBinding(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.Cells.Count > 1)
            {
                try
                {
                    e.Row.Cells[5].Text = DataAcl.Common.BoolStatus(Convert.ToInt32(e.Row.Cells[5].Text.Trim()));
                }
                catch { }
            }
        }
    }
}
